package com.fushenlan.epidemicControl.service;

import com.fushenlan.enums.MarketCacheEnum;
import org.springframework.stereotype.Service;

/**
 * @author PC
 * @title: IMarketCacheService
 * @projectName SpringBootDemo
 * @description: TODO
 * @date 2022/1/21 9:35
 */
@Service
public interface IMarketCacheService {
    Object getCache(MarketCacheEnum keyPrefix, String key);

    void cacheResponse(MarketCacheEnum keyPrefix, String key, Object response, long cacheSeconds);

    void refreshAllCache();

    void deleteCacheByKey(String key);

    boolean hasKey(String key);

    void setKey(String key, Object response, long cacheSeconds);
}
